#ifndef BUSINESSLOGIC_HPP
#define	BUSINESSLOGIC_HPP

#include "entities.hpp"
#include "dataaccess.hpp"
#include "macros.hpp"

using lms::dataaccess::GenericRepository;
using namespace lms::entities;

namespace lms{
    
    namespace bussinesslogic{
        
        class BookServices : public GenericRepository< Book >{
            
        public:
          BookServices();
        };
        
        class CustomerServices : public GenericRepository< Customer >{
            
          public:
            CustomerServices();
            Customer* getByName( std::string fullName );
        };
        
        class OrderServices 
        {
            
        private:
            Order* actualOrder;
            LinkedList< Order >* orders;
        public:
            OrderServices();
            
            LinkedList< Order >* getOrders();
            Order* getActualOrder();
            void setCustomerOrder( Customer* customer );
            void addBook( Book* bookSelected, int amount );
            void removeBook( int index ); 
            void checkout();
            void cancel();
        };
    }
}


#endif	/* BUSINESSLOGIC_HPP */

